package com.cssw.fyzb.busi.service.appeal;

import com.ydn.dbframe.plugin.activerecord.Page;
import com.cssw.fyzb.core.dao.appeal.AppealDao;
import com.cssw.fyzb.core.dao.appeal.AppealTypeDao;
import com.cssw.fyzb.core.model.dodb.Appeal;
import com.cssw.fyzb.core.model.dodb.AppealType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author
 */
@Service
public class AppealServiceImpl implements AppealService {

    @Autowired
    private AppealTypeDao appealTypeDao;

    @Autowired
    private AppealDao appealDao;

    @Override
    public Page<Appeal> listAppeal(Long userId, int pageNumber, int pageSize) {
        return appealDao.listAppeal(userId, pageNumber, pageSize);
    }

    @Override
    public Appeal getAppeal(Long appealId) {
        return appealDao.getAppeal(appealId);
    }

    @Override
    public Long saveAppeal(Long userId, String appealType, String contact, String appeal, String appealAttach, String status) {
        return appealDao.saveAppeal(userId, appealType, contact, appeal, appealAttach, status);
    }

    @Override
    public List<AppealType> listAppealType() {
        return appealTypeDao.listAppealType();
    }
}
